#if !defined(MATERIAL_HPP)
#define MATERIAL_HPP

#include <optional>

#include "ShadePayload.hpp"
#include "Ray.hpp"

struct ShadePayload;

// 描述物体的光学性质
class Material {
public:
    // 获取光线打在该材质上散射光线的方向和衰减率
    virtual bool scatter(
        const Ray& rayIn, const ShadePayload& payload,
        Ray& rayOut, Eigen::Vector3f& attenuation
    )const = 0;
};

#endif // MATERIAL_HPP